x86/traps: honor EXT bit in error codes
authorJan Beulich <jbeulich@suse.com>
Thu, 12 Nov 2015 16:01:53 +0000 (17:01 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 12 Nov 2015 16:01:53 +0000 (17:01 +0100)
commit84064d11a40a6d6b55de8a97049042fc6d67dbb3
treec60e6767aab7f296746f1a2a0ca3b860cbfbec65
parent723742d9c73d0ad21b01d66f07726ee7a4c3125b
x86/traps: honor EXT bit in error codes

The specification does not explicitly limit the use of this bit to
exceptions that can have selector style error codes, so to be on the
safe side we should deal with it being set even on error codes formally
documented to be always zero (if they're indeed always zero, the change
is simply dead code in those cases).

Introduce and use (where suitable) X86_XEC_* constants to make the code
easier to read.

To match the placement of the "hardware_trap" label, the "hardware_gp"
one gets moved slightly too.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/traps.c
xen/arch/x86/x86_64/entry.S
xen/include/asm-x86/processor.h